#!/bin/bash

# $1: working id
# $2: pool id

if [ $# -ne 2 ]; then
    echo "Error: Missing argument"
    exit 1
fi

set -e
WD=/data/cbj/destor/working$1
POOL=$WD$2
mkdir $POOL
ln -s $WD/container.pool $POOL/container.pool
cp $WD/manifest $POOL/manifest
mkdir $POOL/index

mkdir $POOL/recipes
ln -s $WD/recipes/bv0.meta $POOL/recipes/bv0.meta
ln -s $WD/recipes/bv0.sparse $POOL/recipes/bv0.sparse
ln -s $WD/recipes/bv0.recipe $POOL/recipes/bv0.recipe
ln -s $WD/recipes/bv0.records $POOL/recipes/bv0.records
